package com.quanyan.pay.exception;

import com.quanyan.common.enums.BaseEnum;

/**
 * @author
 * @date 16/5/27-14:06
 */
public enum RespPayEnum implements BaseEnum {


    ONLY_ONE_THIRD_PARD_PAY_WAY_ALLOWED(30000, "ONLY_ONE_THIRD_PART_PAY_WAY_ALLOWED", "同一订单内仅允许一种第三方支付", false),

    ORDER_PROCESSED_SUCCESS(30001, "ORDER_PROCESSED_SUCCESS", "订单处理成功", false),
    ORDER_PROCESSED_FAIL(30002, "ORDER_PROCESSED_FAIL", "订单处理失败", false),
    UN_KNOW_PAY_WAY(30003, "UN_KNOWN_PAY_WAY", "未知的支付方式", false),
    ORDER_REFUND_APPLY_SUCCESS(30004, "ORDER_REFUND_APPLY_SUCCESS", "订单退款申请成功", true),
    ORDER_PROCESSED_ALREADY(30005, "ORDER_PROCESSED_ALREADY", "订单已处理", false),
    ORDER_NOT_EXISTS(30006, "ORDER_NOT_EXISTS", "订单不存在", false),
    ORDER_NOT_PAYED(30007, "ORDER_NOT_PAYED", "订单未支付", false),
    ORDER_HAD_PAYED(30008, "ORDER_HAD_PAYED", "订单已支付", false),
    UN_KNOW_VIRTURL_PAY_WAY(30009, "UN_KNOW_VIRTURL_PAY_WAY", "未知的虚拟货币", false),
    INVALID_PAY_WAY(30010, "INVALID_PAY_WAY", "非法的支付方式", false),
    VIRTURL_CURRENCY_NOT_ENOUGH(30011, "VIRTURL_CURRENCY_NOT_ENOUGH", "虚拟货币不足", false),
    VIRTURL_CURRENCY_OVER_TOP(30012, "VIRTURL_CURRENCY_OVER_TOP", "虚拟货币超过限制", false),
    ORDER_AMOUNT_ISNOTMATCH_PAY_AMOUNT(30013, "ORDER_AMOUNT_ISNOTMATCH_PAY_AMOUNT", "订单金额和支付金额不匹配", false),
    REFUND_AMOUNT_INVALID(30014, "REFUND_AMOUNT_INVALID", "退款金额非法", false),
    PAY_WAY_NOT_EXIST(30015, "PAY_WAY_NOT_EXIST", "支付方式不存在", false),
    ORDER_REFUND_AMOUNT_OVERTOP(31001, "ORDER_REFUND_AMOUNT_OVERTOP", "退款金额超过支付金额", false),
    ALIPAY_CONFIG_NOT_EXIST(30016, "ALIPAY_CONFIG_NOT_EXIST", "支付宝配置不存在", false),
    INVALID_VIRTURL_PAY_AMOUNT(30017, "INVALID_VIRTURL_PAY_AMOUNT", "非法的虚拟货币数量", false),
    INVALID_PAY_AMOUNT(30018, "INVALID_PAY_AMOUNT", "非法的支付金额", false),
    WITHDRAW_RECORD_IS_NULL(30019, "WITHDRAW_RECORD_IS_NULL", "没有该提现记录", false),
    INVALID_WITHDRAW(30020, "INVALID_WITHDRAW", "非法提现", false),
    PAY_AMOUNT_VALID(30021, "PAY_AMOUNT_VALID", "支付金额跟订单金额不匹配", false),
    INVALID_WITHDRAW_AMOUNT(30022, "INVALID_WITHDRAW_AMOUNT", "非法提现金额", false),




    WEICHAT_INTERNAL_SERVER_ERROR(31000, "WEICHAT_INTERNAL_SERVER_ERROR", "微信内部服务异常", false),
    ALIPAY_INTERNAL_SERVER_ERROR(32000, "ALIPAY_INTERNAL_SERVER_ERROR", "支付宝内部服务异常", false);



    private int id;

    private String code;

    private String label;

    private boolean success;

    RespPayEnum(int id, String code, String label, boolean success) {
        this.id = id;
        this.code = code;
        this.label = label;
        this.success = success;
    }

    @Override
    public int getId() {
        return this.id;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getLabel() {
        return this.label;
    }

    @Override
    public boolean isSuccess() {
        return this.success;
    }
}
